<?php

namespace App\Http\Controllers\Student;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
use App\Article;
use App\Template;

class HomeController extends Controller
{
    //
    public function index()
    {
        $user = \Auth::user();
        $articles = Article::orderBy('updated_at', 'desc')->get();
        $templates = Template::orderBy('updated_at', 'desc')->get();
        return view('student.index', compact("user", "articles", "templates"));
    }

}
